<?php


namespace App\Tool;


class Json
{


    static function code($code,$msg='',$data=[]){


        return json_encode(['code'=>$code,'msg'=>$msg,'data'=>$data]);
    }

    static function codeArray($code,$msg='',$data=[]){

        return ['code'=>$code,'msg'=>$msg,'data'=>$data];
    }



}
